//
//  BaselViewController.m
//  PCSchool
//
//  Created by Arindam Ghosh on 7/10/13.
//  Copyright (c) 2013 Jayanta. All rights reserved.
//

#import "BaselViewController.h"
#import "MBProgressHUD.h"


@interface BaselViewController ()


@end

@implementation BaselViewController

@synthesize appDelegate;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    //NSLog(@"ARINDAM");
    self.appDelegate = (PCSchoolAppDelegate*)[[UIApplication sharedApplication] delegate];


    // Do any additional setup after loading the view from its nib.
}
-(void)viewWillAppear:(BOOL)animated
{
    //NSLog(@"Jayanta");
    
    self.navigationController.navigationBarHidden = YES;
    [[UIApplication sharedApplication] setStatusBarHidden:YES];

}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(void) createLoadingView
{
    HUD = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
    [self.navigationController.view addSubview:HUD];
    HUD.delegate = self;
    HUD.labelText = @"Loading";
    //HUD.detailsLabelText = @"";
    HUD.square = YES;
    [HUD show:YES];
}

-(void) removeLoadingView
{

    // Remove HUD from screen when the HUD was hidded
    
    [HUD removeFromSuperview];
    [HUD release];
    HUD = nil;
    
}

- (void)showAlertMessage:(NSString *)message
// Shows an alert view containing the specified error message.
{
	UIAlertView *alert=[[UIAlertView alloc] initWithTitle:CLIENT_NAME
												  message:message
												 delegate:nil
										cancelButtonTitle:@"OK" otherButtonTitles:nil];
	[alert show];
	alert.delegate=self;
	[alert release];
    
}


@end
